/*全选 反选*/
function select(id){ 
	//alert(id);
    var selectlist = document.getElementById(id).getElementsByTagName("input");  
    for (var i = 0; i < selectlist.length; i++) { 
    //alert(selectlist[i].type);   
        if(selectlist[i].type == "checkbox"){ 
	       e=selectlist[i];
	       if (e.checked) {
	          e.checked=false;        
	       }else{
	          e.checked=true;        
	       } 
        } 
    }
} 
/*弹出框选择*/
function OpenWindowAndSetValue(Url,WindowObj,SetObj1,SetObjt2)
	{	 
		var aurl = Url; //加载地址
		var aobj = WindowObj; //给弹出框传值，默认为window
		var Width =600;
		var Height = 550;
		var aFeatures = "dialogWidth:"+Width+"px;dialogHeight:"+Height+"px;status:no;help:no;scroll:no;";
		var ReturnStr=showModalDialog(Url,WindowObj,aFeatures);
		if (ReturnStr!='' &&ReturnStr!=undefined){
			var strarr = ReturnStr.split(",");
			document.all(SetObj1).value+=strarr[0];
			document.all(SetObjt2).value+=strarr[1];
			}
		//return ReturnStr;
	}
 /*弹出框选择*/
function OpenWindowAndSetValue(Url,WindowObj,SetObj1,SetObjt2,SetObjt3)
	{	 
		var aurl = Url; //加载地址
		var aobj = WindowObj; //给弹出框传值，默认为window
		var Width =600;
		var Height = 550;
		var aFeatures = "dialogWidth:"+Width+"px;dialogHeight:"+Height+"px;status:no;help:no;scroll:no;";
		var ReturnStr=showModalDialog(Url,WindowObj,aFeatures);
		if (ReturnStr!='' &&ReturnStr!=undefined){
			var strarr = ReturnStr.split(",");
			document.all(SetObj1).value=strarr[0];
			document.all(SetObjt2).value=strarr[1];
			document.all(SetObjt3).value=strarr[2];
			}
		//return ReturnStr;
	}
function clearvaluethree(obj1,obj2,obj3){
	document.all(obj1).value = "";
	document.all(obj2).value = "";
	document.all(obj3).value = "";
}
function clearvaluetwo(obj1,obj2){
	document.all(obj1).value = "";
	document.all(obj2).value = "";
}
function clearvaluefive(obj1,obj2,obj3,obj4,obj5){
	document.all(obj1).value = "";
	document.all(obj2).value = "";
	document.all(obj3).value = "";
	document.all(obj4).value = "";
	document.all(obj5).value = "";
}
//页面帮助信息显示
function help(bm){
	if (bm==""){
		bm=sethelpbm(bm);
	}
	var aurl ="/jxkh/sys/findsyshelp.action?sysMenuBm="+bm;
	var aFeatures="dialogWidth:400px;dialogHeight:420px;status:no;scroll:no;";
	window.showModalDialog(aurl,"　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　　",aFeatures);
	//$.get("/jxkh/sys/findsyshelp.action?sysMenuBm="+bm);
	//$("#form1").load("/jxkh/sys/findsyshelp.action?sysMenubm="+bm);
  	//if($(".helpdiv").css("display")=="none"){
  		///$(".helpdiv").css("display","block");
  		//return ;
  	//}
  	//if($(".helpdiv").css("display")=="block"){
  		//$(".helpdiv").css("display","none");
  		//return ;
  //	}
}

function sethelpbm(bm){
	if (window.self==window.top) return;
	var aa=window.top.frames["header"].document.getElementById("idsysMenuBm");
	if (bm!=""){
		aa.value=bm;	
	}else if (aa.value!=""){
		bm=aa.value;
	}
	//alert(bm);
	return bm;
}

 